﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace BankService
{
    [ServiceContract]
    public interface IBankContract
    {
        [OperationContract]
        bool IsAvailable();

        [OperationContract]
        decimal GetBalance(string accountId);

        [OperationContract]
        decimal GetPendingAmount(string accountId);
        
        [OperationContract]
        bool Withdraw(string accountId, decimal amount);

        [OperationContract]
        void Deposit(string accountId, decimal amount);

        [OperationContract]
        void Refund(string accountId, decimal amount);

        [OperationContract]
        bool Pending(string accountId, decimal amount);

        [OperationContract]
        void CancelPending(string accountId, decimal amount);

        [OperationContract]
        void CommitPending(string accountId, decimal amount);

        [OperationContract]
        bool SetCanBePending(bool value);

        [OperationContract]
        void Reset(string accountId);

    }
}
